python avoid keyerror in dict

welcome to shbcf.ru